From 97b142eb0321acfdb1ab38d1d2ed23f06e61da65 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Sun, 19 Oct 2008 16:27:13 +0000 Subject: [PATCH] Change GUI environment to 'Turbo Delphi 2006'. --- win32/gui-2/GPSBabel.bdsgroup | 19 ++++ win32/gui-2/GPSBabelGUI.bdsproj | 183 ++++++++++++++++++++++++++++++++ win32/gui-2/GPSBabelGUI.cfg | 8 +- win32/gui-2/GPSBabelGUI.dpr | 19 +++- win32/gui-2/GPSBabelGUI.res | Bin 1752 -> 1752 bytes win32/gui-2/Makefile | 9 +- win32/gui-2/README.gui | 8 +- win32/gui-2/about.dfm | Bin 3505 -> 3561 bytes win32/gui-2/about.pas | 1 + win32/gui-2/common.pas | 11 +- win32/gui-2/filter.dfm | Bin 8971 -> 8563 bytes win32/gui-2/filter.pas | 2 +- win32/gui-2/gpsbabel.iss | 4 +- win32/gui-2/main.dfm | Bin 38619 -> 39513 bytes win32/gui-2/main.pas | 95 +++++++++++++---- win32/gui-2/options.dfm | Bin 1332 -> 1350 bytes win32/gui-2/options.pas | 2 +- win32/gui-2/select.dfm | Bin 1450 -> 1495 bytes win32/gui-2/select.pas | 3 +- win32/gui-2/utils.pas | 2 +- 20 files changed, 324 insertions(+), 42 deletions(-) create mode 100644 win32/gui-2/GPSBabel.bdsgroup create mode 100644 win32/gui-2/GPSBabelGUI.bdsproj diff --git a/win32/gui-2/GPSBabel.bdsgroup b/win32/gui-2/GPSBabel.bdsgroup new file mode 100644 index 000000000..79cb36ca8 --- /dev/null +++ b/win32/gui-2/GPSBabel.bdsgroup @@ -0,0 +1,19 @@ + + + + + + + + + + + + + GPSBabelGUI.bdsproj + GPSBabelGUI.exe + + + + diff --git a/win32/gui-2/GPSBabelGUI.bdsproj b/win32/gui-2/GPSBabelGUI.bdsproj new file mode 100644 index 000000000..4ed89faba --- /dev/null +++ b/win32/gui-2/GPSBabelGUI.bdsproj @@ -0,0 +1,183 @@ + + + + + + + + + + + + GPSBabelGUI.dpr + + + 7.0 + + + 4 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 1 + False + False + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + False + False + False + True + True + True + True + True + True + + + + 0 + 0 + False + 1 + False + False + False + 16384 + 1048576 + 4194304 + + + + + + + + + vcl;rtl;vclx;dbrtl;adortl;vcldb;bdertl;vcldbx;teeui;teedb;tee;ibxpress;visualclx;visualdbclx;dsnap;vclactnband + MSWINDOWS + + False + + + + + + False + + + True + False + + + + $00000000 + + + + True + False + 0 + 2 + 21 + 0 + False + False + False + False + False + 1033 + 1252 + + + GPSBabel Makers + GPSBabel Windows Frontend + 0.2.21.0 + + (C) 2005-2008 Olaf Klein (o.b.klein@gpsbabel.org) + + GPSBabelGUI.exe + GPSBabel + 1.3.x + + + Borland InterBase Express Components + Intraweb 8.0 Design Package for Borland Development Studio 2006 + Indy 10 Core Design Time + Borland Sample Components + Indy 10 Protocols Design Time + TeeChart Components + + + True + diff --git a/win32/gui-2/GPSBabelGUI.cfg b/win32/gui-2/GPSBabelGUI.cfg index 8adc0e882..3a53153de 100644 --- a/win32/gui-2/GPSBabelGUI.cfg +++ b/win32/gui-2/GPSBabelGUI.cfg @@ -1,4 +1,4 @@ --$A- +-$A4 -$B- -$C- -$D- @@ -31,5 +31,9 @@ -M -$M16384,1048576 -K$00400000 --LNc:\programme\borland\delphi4\Lib +-LE"C:\Documents and Settings\Admin\My Documents\Borland Studio Projects\Bpl" +-LN"C:\Documents and Settings\Admin\My Documents\Borland Studio Projects\Bpl" -DMSWINDOWS +-w-UNSAFE_TYPE +-w-UNSAFE_CODE +-w-UNSAFE_CAST diff --git a/win32/gui-2/GPSBabelGUI.dpr b/win32/gui-2/GPSBabelGUI.dpr index 9dd0094e0..265ba9fa7 100644 --- a/win32/gui-2/GPSBabelGUI.dpr +++ b/win32/gui-2/GPSBabelGUI.dpr @@ -1,6 +1,6 @@ program GPSBabelGUI; { - Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org + Copyright (C) 2005-2008 Olaf Klein, o.b.klein@gpsbabel.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +17,22 @@ program GPSBabelGUI; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA } +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\filter\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\delphi\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\options\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\common\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\about\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\utils\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\main\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\gnugettext\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\gnugettextDx\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\GPSBabelGUI\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\select\default.txaPackage'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\default.txvpck'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\main\default.txvpck'} +{%TogetherDiagram 'ModelSupport_GPSBabelGUI\GPSBabelGUI\default.txvpck'} + uses gnugettext in 'gnugettext.pas', gnugettextDx in 'gnugettextDx.pas', @@ -48,6 +64,7 @@ begin {$ENDIF} Application.Initialize; + Application.Title := 'GPSBabelGUI-2'; Application.CreateForm(TfrmMain, frmMain); Application.Run; end. diff --git a/win32/gui-2/GPSBabelGUI.res b/win32/gui-2/GPSBabelGUI.res index c86993a01ee216c1c28d91ee28e08054aeeb10d3..9757406105fd0f19d7d25159bf9749288393012f 100644 GIT binary patch delta 39 scmcb?dxLjF12eOL0O#apW_wOi1||j&5Z!#5S(cI6h{164YnHc+0KAk5OaK4? delta 39 scmcb?dxLjF12eM$1N-D=W_wNn1||j&5ZHX0S(cI6kil&8YnHc+0KKvaQ~&?~ diff --git a/win32/gui-2/Makefile b/win32/gui-2/Makefile index 691c7915f..fa311d5e2 100644 --- a/win32/gui-2/Makefile +++ b/win32/gui-2/Makefile @@ -22,12 +22,12 @@ LANG = \ locale\fr\LC_MESSAGES\delphi.mo \ locale\fr\LC_MESSAGES\default.mo \ locale\fr\LC_MESSAGES\gpsbabel.mo \ - locale\it\LC_MESSAGES\delphi.mo \ - locale\it\LC_MESSAGES\default.mo \ - locale\it\LC_MESSAGES\gpsbabel.mo \ locale\hu\LC_MESSAGES\delphi.mo \ locale\hu\LC_MESSAGES\default.mo \ - locale\hu\LC_MESSAGES\gpsbabel.mo + locale\hu\LC_MESSAGES\gpsbabel.mo \ + locale\it\LC_MESSAGES\delphi.mo \ + locale\it\LC_MESSAGES\default.mo \ + locale\it\LC_MESSAGES\gpsbabel.mo .suffixes: .po @@ -64,4 +64,5 @@ clean: rm -f locale\es\LC_MESSAGES\*.mo rm -f locale\fr\LC_MESSAGES\*.mo rm -f locale\hu\LC_MESSAGES\*.mo + rm -f locale\it\LC_MESSAGES\*.mo diff --git a/win32/gui-2/README.gui b/win32/gui-2/README.gui index 220ac043f..60c4cc966 100644 --- a/win32/gui-2/README.gui +++ b/win32/gui-2/README.gui @@ -61,10 +61,4 @@ the snapshots. * Compiling from source * ------------------------- -Currently the gui is developed under Delphi 4. Other releases of Delphi are -tested but are not used because of backward compatibility. If you want to help -us and Delphi is not in your software collection, "Delphi 6 Personal Edition" -would be the cheapest (or free) way. - - - +Currently the GUI is developed with Turbo Delphi 2006, a free release. diff --git a/win32/gui-2/about.dfm b/win32/gui-2/about.dfm index da7417a420d02497e7c9f9a6225fbeb2cb903f02..67094dcba11968fcc0ac9ff36246144038a747f9 100644 GIT binary patch delta 129 zcmdle{Zd-sKNmxYTad4#lYeLkgMq-cjRMCQg}7W&i!;;nf-|d98JSg>n9UhCUuC?< zEQ})lmXTSJkzw;@)>t<2;F8LmRCa-!B>(cf)FPLn#B#UHiqw?J{5;N+vv{7M8_1-> JFxihc82}>LCpiEB delta 72 zcmV-O0Js0?8?hS@{|W$9Mp8{dLQhpx05A}qu@J@qv*`id1GCu$T?Ug*3_=(MQ*?Q3 eWd{&!Vo!H&WpYGvVRuGpcx7ahkPPILh7DtmxEb64 diff --git a/win32/gui-2/about.pas b/win32/gui-2/about.pas index ecc118f97..50ebe27cc 100644 --- a/win32/gui-2/about.pas +++ b/win32/gui-2/about.pas @@ -88,6 +88,7 @@ begin lbxTranslators.Items.Add(_('French') + ' ' + _('by') + ' Lilian Morinon'); lbxTranslators.Items.Add(_('Spanish') + ' ' + _('by') + ' Daniel Diaz'); lbxTranslators.Items.Add(_('Hungarian') + ' ' + _('by') + ' Sprok Bence'); + lbxTranslators.Items.Add(_('Italian') + ' ' + _('by') + ' Michele Locati'); end; procedure TfrmAbout.lbURLMouseMove(Sender: TObject; Shift: TShiftState; X, diff --git a/win32/gui-2/common.pas b/win32/gui-2/common.pas index 9303350c3..fe9410568 100644 --- a/win32/gui-2/common.pas +++ b/win32/gui-2/common.pas @@ -1,7 +1,7 @@ unit common; { - Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org + Copyright (C) 2005-2008 Olaf Klein, o.b.klein@gpsbabel.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -115,7 +115,7 @@ type public Capas: Integer; property Name : String read FName; - property Description : String read FDescription; + property Description : String read FDescription write FDescription; property Ext : String read FExt; property ReadAny : Boolean read CanReadAny; property WriteAny : Boolean read CanWriteAny; @@ -461,7 +461,11 @@ begin 2: name := StrPas(cin); 3: - ext := StrPas(cin); + begin + ext := StrPas(cin); + while (Pos('.', ext) <> 0) do + System.Delete(ext, Pos('.', ext), 1); + end else begin comment := StrPas(cin); if (Length(comment) = 0) or (Length(name) = 0) then break; @@ -578,5 +582,6 @@ initialization gpsbabel_exe := SysUtils.ExtractFilePath(ParamStr(0)) + SGPSBabelExeFilename; SGPSBabelGUIVersion := GetFileVersion(ParamStr(0)); //gpsbabel_ini := Open_gpsbabel_ini(); + DecimalSeparator := '.'; end. diff --git a/win32/gui-2/filter.dfm b/win32/gui-2/filter.dfm index a6a38a91c4e2e4b4571612a63d2835ce0f867d3b..ee535ff5c06cd7c48dee75e8abe656bd70e7e5d4 100644 GIT binary patch delta 165 zcmeBn`|Kq2pNk>HEy&l+(Vv>JRN@@|4@Z=Jh?4J=zM1exP5L~gzfdZnFy*ZCeHsn#5ypctC@@y^_Fx!q>d~zc9F1Yw|9%q>N e<{aMb%#;5saxqFwRuHEy&l+(cQ)yO{Nl`#%=|ni29A)#B>$q6)FLKf zmhhs)0*=YaY%7(ReKSFF*p!Jtlx-GgXJ^D}jwsX|4USz{<;9@#_gO?IGjbjg<8e;R zam>j~&&y5CD`96(DM|E6O)HtK%dOze<&s#E>Xu)Wn+TFf3(m+dD&YW$`R1pjvU8>6 zI_Kvmy}PW8+yC@q=%meU`PRX&th6_S~Y zY!%1kVy<0y?4qi-Lb?6$SVdKDZNA05oq6&ceobyfqLJ8qlwXLM4Vosd3(esJ0LO63 A?EnA( diff --git a/win32/gui-2/filter.pas b/win32/gui-2/filter.pas index 82497865d..274d8c930 100644 --- a/win32/gui-2/filter.pas +++ b/win32/gui-2/filter.pas @@ -1,7 +1,7 @@ unit filter; { - Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org + Copyright (C) 2005-2008 Olaf Klein, o.b.klein@gpsbabel.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/win32/gui-2/gpsbabel.iss b/win32/gui-2/gpsbabel.iss index d703b5e7a..944a26fbc 100644 --- a/win32/gui-2/gpsbabel.iss +++ b/win32/gui-2/gpsbabel.iss @@ -1,8 +1,8 @@ ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! -#define Version "1.3.5" -#define Release "-beta20070807" +#define Version "1.3.6" +#define Release "-beta20080514" [Setup] AppName=GPSBabel diff --git a/win32/gui-2/main.dfm b/win32/gui-2/main.dfm index 873cc246c7c163a28be98b1391dc0194d6e97a83..7b20341bfe7ae7b6a37982191880cf3dd7aacff7 100644 GIT binary patch delta 1035 zcma)5%}*0S6rb6xE$y~t!PbI=U{t7|Kt+x5VA4{mBrP;_iHHg5ZaYgith>;iCTL;; zA@M>qY2MBFC-|Aw#G@h?4-z>TqYV;_9`tPDNpagk1WJtalF7{Pz4v<`d9U<<`S6tC z*Ih`64J8uc{sGj@U%Xr757qfGE9jHV_2OWl&E2aiM5C98GM=OCW6V|mmz6Bdu?x%- z`4?_*MTwz|YboUh!R!l$iJKDh$N>qb3)`W=^%XETTmHejCLcWGe11I1#c7aZw_wTa^Y26pFS!v)$X{Fg5>syd~C|rp;JK zcaHlVlPAXDc`ydc>2~;(=Dh1@tH9Dka5s2W3cymD zhwoC2M@eddB{{H@Xmu(8AG0m>TiLBQERxVp)6!HMJRGRA0&q3vD^sl-I*)f-rWR8! zRAauV)MEdjSQA^}Th47&?A*z|EVaVQg#UlxN;hj#tTx%>*vK6God@wfIM?|G8oR=H z)fBpd_;5!Gq5e3=dyx;>5O2wP`S6w7x+00Q$eiy!on$T`csX+n=0k4t=gchz=0f|- zn{!{BSA4qMH%*CVD7qF^WSQixJ*n5_q)2m#fuIR6Q5FgDq#z6jVZlDQ3KG*~hp8;qBh+ke0 zBHz7Z;CuHD$g(f5|8HCm6yR$BiU0+Qzn2$-6g+5vC@?oi)c`l(0Yu)|y#6!Tz;_H_ z1A%@(=L1azS_lF_)_)K{@F5=NEk+5dO9o1e6DNN)ILpf&oS9pYlNykimzu*d`H-O_ z '') and (AnsiPos('.' + Cap.Ext, Cap.Description) = 0) then + begin + Cap.Description := Cap.Description + ' (.' + Cap.Ext + ')'; + end; + Target.Items.AddObject(Cap.Description, Cap); + end; end; s := ReadProfile(Target.Tag); @@ -455,25 +476,41 @@ var i: Integer; cap : TCapability; begin + edInputFile.SetFocus; dlgFileOpen.Filter := ''; - dlgFileOpen.DefaultExt := '*.*'; - - s:=''; - if (cbInputFormat.ItemIndex <> -1 ) then begin - cap:= TCapability(cbInputFormat.Items.Objects[cbInputFormat.ItemIndex]); - ext := cap.Ext; - if (Length(ext)>0) then - s := cbInputFormat.Text + '|*.' + ext + '|'; + dlgFileOpen.DefaultExt := ''; + + s := ''; + if (cbInputFormat.ItemIndex <> -1 ) then + begin + cap := FCaps.GetCapabilityByName(cbInputFormat.Text); + if (cap.Ext <> '') then + begin + s := Format('%s|*.%s|', [cbInputFormat.Text, cap.Ext]); + dlgFileOpen.DefaultExt := '*.' + cap.Ext; + end; end; s := s + _('All files (*.*)|*.*'); dlgFileOpen.Filter := s; + + if (dlgFileOpen.InitialDir = '') then + begin + dlgFileOpen.InitialDir := SysUtils.ExtractFilePath(dlgFileSave.FileName); + if (dlgFileOpen.InitialDir = '') then + dlgFileOpen.InitialDir := dlgFileSave.InitialDir; + if (dlgFileOpen.InitialDir = '') then + dlgFileOpen.InitialDir := GetCurrentDir; + end; + if not SELF.dlgFileOpen.Execute then Exit; edInputFile.Text := ''; for i := 0 to dlgFileOpen.Files.Count - 1 do begin s := dlgFileOpen.Files[i]; + if (i = 0) then + dlgFileSave.InitialDir := ExtractFilePath(s); if (s[1] <> '"') or (s[Length(s)] <> '"') then s := AnsiQuotedStr(s, '"'); if (edInputFile.Text <> '') then edInputFile.Text := edInputFile.Text + ', '; @@ -603,22 +640,41 @@ end; procedure TfrmMain.sbSaveFileClick(Sender: TObject); var s: string; - cap : TCapability; + cap: TCapability; begin + edOutputFile.SetFocus; dlgFileSave.Filter := ''; - dlgFileSave.DefaultExt := '*.*'; + dlgFileSave.DefaultExt := ''; - s:=''; - if (cbOutputFormat.ItemIndex <> -1) then begin - cap:=FCaps.Capability[cbOutputFormat.ItemIndex]; - s := Format('%s|%s',[cbOutputFormat.Text,cap.Ext,cap.Ext]); + s := ''; + if (cbOutputFormat.ItemIndex <> -1) then + begin + cap := FCaps.GetCapabilityByName(cbOutputFormat.Text); + if (cap.Ext <> '') then + begin + s := Format('%s|*.%s|',[cbOutputFormat.Text, cap.Ext]); + dlgFileSave.DefaultExt := '*.' + cap.Ext; + end; end; s := s + _('All files|*.*'); dlgFileSave.Filter := s; + + + if (dlgFileSave.InitialDir = '') then + begin + dlgFileSave.InitialDir := SysUtils.ExtractFilePath(dlgFileOpen.FileName); + if (dlgFileSave.InitialDir = '') then + dlgFileSave.InitialDir := dlgFileOpen.InitialDir; + if (dlgFileSave.InitialDir = '') then + dlgFileSave.InitialDir := GetCurrentDir; + end; + if not SELF.dlgFileSave.Execute then Exit; edOutputFile.Text := dlgFileSave.FileName; + dlgFileSave.InitialDir := SysUtils.ExtractFilePath(dlgFileSave.FileName); + CheckInput; end; @@ -635,6 +691,7 @@ var sp: PChar; cap : TCapability; begin + memoOutput.SetFocus; acLetsGo.Enabled := False; try acFinalizeDropDownsExecute(nil); diff --git a/win32/gui-2/options.dfm b/win32/gui-2/options.dfm index e9114954d2f614314e10de207a88080ea1869eb8..6863765accd9bd220f3f10418b86127a63b3d5f5 100644 GIT binary patch delta 50 zcmdnOb&N~sKNmxYTad4RK!~TmUoeA#fZ;|VRwh9%m(=3S^t|BAs#Hei<%~=Uo5h&q Fm;q~&4HN(X delta 32 ncmX@cwS`OQKNmxYTad4RK!~TmUoeA#fc!=wR;JCGOtQ=Xo+Su2 diff --git a/win32/gui-2/options.pas b/win32/gui-2/options.pas index f90744526..454012e36 100644 --- a/win32/gui-2/options.pas +++ b/win32/gui-2/options.pas @@ -1,7 +1,7 @@ unit options; { - Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org + Copyright (C) 2005-2008 Olaf Klein, o.b.klein@gpsbabel.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/win32/gui-2/select.dfm b/win32/gui-2/select.dfm index 7544131b3912462d84660a0917a37e0a1aab7574..3187153996c90a6c2d7bd2758a1db5d6e7dd8223 100644 GIT binary patch delta 82 zcmZ3*eVtqIKNmxYTaa(CtB-nR#ycMY+zY mc_pbun?)J-FbZ+Gq!wqU=LKh0r7|*iFfu7HY`(~JlL-Jc92xuo delta 36 scmcc4y^34#KNmxYTaa(CtB